//
//  MainView.m
//  Waterfall
//
//  Created by hcjamm on 11/10/11.
//  Copyright hcjamm Technologies 2009. All rights reserved.
//

#import "MainView.h"
#import <QuartzCore/QuartzCore.h>
#import "SoundEngine.h"

#define kListenerDistance			1.0  // Used for creating a realistic sound field

@implementation MainView

- (IBAction)playOceanWaves {

    	[self startBackgroundMusic];

}


- (void) startBackgroundMusic{
	
	NSBundle* bundle = [NSBundle mainBundle];
	

	SoundEngine_Initialize(44100);
	SoundEngine_SetListenerPosition(0.0, 0.0, kListenerDistance);
	SoundEngine_LoadBackgroundMusicTrack([[bundle pathForResource:@"oceanwaves" ofType:@"m4v"] UTF8String], true, true);
	
	SoundEngine_StartBackgroundMusic();
	
}

- (void)drawRect:(CGRect)rect {
	
}


- (id)initWithFrame:(CGRect)frame {
	if (self = [super initWithFrame:frame]) {

	}
	return self;
}


- (void)dealloc {
	[super dealloc];
}


@end
